home *** CD-ROM | disk | FTP | other *** search
/ Windows Gamepack / Windows Gamepack.iso / gamepack.mst < prev    next >
Text File  |  1995-05-12  |  2KB  |  81 lines

  1. '' Klik & Play Gamepack Setup
  2.  
  3. '$INCLUDE 'setupapi.inc'
  4.  
  5. CONST EUROPRESS    = 1
  6. CONST WELCOME    = 100
  7. CONST ASKQUIT    = 200
  8.  
  9. DECLARE SUB Install
  10.  
  11. INIT:
  12.     UIDLL$ = "mscuistf.dll"
  13.  
  14.     SetBitmap UIDLL$, EUROPRESS
  15.     SetTitle "Klik & Play Gamepack Setup"
  16.  
  17.     '' Find and load GAMEPACK.INF
  18.     szInf$ = GetSymbolValue("STF_SRCINFPATH")
  19.     if szInf$ = "" then
  20.         szInf$ = GetSymbolValue("STF_CWDDIR") + "GAMEPACK.INF"
  21.     endif
  22.  
  23.     ReadInfFile szInf$
  24.  
  25. WELCOME:
  26.     sz$ = UIStartDlg(UIDLL$, WELCOME, "FInfoDlgProc", 0, "")
  27.  
  28.     if sz$ = "INSTALL" then
  29.         Install
  30.     else
  31.         gosub ASKQUIT
  32.         goto WELCOME
  33.     endif
  34.  
  35. QUIT:
  36.     UIPopAll
  37.     END
  38.  
  39. ASKQUIT:
  40.     sz$ = UIStartDlg(UIDLL$, ASKQUIT, "FQuitDlgProc", 0, "")
  41.     if sz$ = "EXIT" then
  42.         UIPopAll
  43.         ERROR STFQUIT
  44.     elseif sz$ = "REACTIVATE" then
  45.         goto ASKQUIT
  46.     else
  47.         UIPop 1
  48.     endif
  49.     return
  50.  
  51. SUB Install STATIC
  52.     '' Copy CTL3DV2.DLL to Windows\System or Windows directory
  53.  
  54.     SrcDir$ = GetSymbolValue("STF_SRCDIR")
  55.  
  56.     Win$ = GetWindowsDir()
  57.     Sys$ = GetWindowsSysDir()
  58.  
  59.     '' Check Windows\System is writable
  60.     if IsDirWritable(Sys$) = 0 then
  61.         Sys$ = Win$
  62.     endif
  63.  
  64.     '' Copy files
  65.     ClearCopyList
  66.     AddSectionFilesToCopyList "WindowsSystem", SrcDir$ + "ctl3dv2", Sys$
  67.     CopyFilesInCopyList
  68.  
  69.     '' Create program group and items
  70.  
  71.     CreateProgmanGroup "Klik & Play Gamepack", "knpgame.grp", cmoNone
  72.     ShowProgmanGroup "Klik & Play Gamepack", 1, cmoNone
  73.     CreateProgmanItem "Klik & Play Gamepack", "Gamepack Menu", SrcDir$ + "MENU.EXE", "", cmoOverwrite
  74.     CreateProgmanItem "Klik & Play Gamepack", "Interactive Demo Setup", SrcDir$ + "KNP\SETUP.EXE", "", cmoOverwrite
  75.     CreateProgmanItem "Klik & Play Gamepack", "Read Me", SrcDir$ + "README.WRI", "", cmoOverwrite
  76.  
  77.     '' Create basic KNP.INI
  78.  
  79.     CreateIniKeyValue Win$ + "KNP.INI", "Setup", "grmode", "1", cmoNone
  80. END SUB
  81.